package routers

import (
	beego "github.com/beego/beego/v2/server/web"
	"novel/controllers"
)

func init() {
	beego.Router("/", &controllers.MainController{})

	beego.Router("/register", &controllers.UserController{}, "POST:Register")
	beego.Router("/login", &controllers.UserController{}, "POST:Login")

	beego.Router("/list", &controllers.NovelController{}, "Get:List")

	beego.Router("/add", &controllers.NovelController{}, "POST:Add")
	beego.Router("/upload", &controllers.NovelController{}, "POST:Upload")
}
